import React from 'react';
import { useEffect } from 'react';
import { useHistory } from 'react-router-dom';
import notfound from '../assets/404.jpg'
import {message} from 'antd'
function NotFound(props) {
    const history=useHistory()
    useEffect(()=>{
        message.success('您访问的页面不存在，4秒后跳转到首页')
        setTimeout(() => {
            history.push('/index')
        }, 4000);
    },[])

    return (
        <div className='notfound'>
            <img src={notfound} alt="" style={{width:'100%'}} />
        </div>
    );
}

export default NotFound;